Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify recoverWithNull when reading JSON files #9304

Merged
merged 15 commits into from
Oct 26, 2023

Conversation

andygrove
Copy link
Contributor

@andygrove andygrove commented Sep 26, 2023

Closes #9326
Closes #9310

Depends on rapidsai/cudf#14279

This PR enables the new cuDF option recoverWithNulls (see rapidsai/cudf#12532) when reading from JSON files.

@andygrove andygrove self-assigned this Sep 26, 2023
@andygrove andygrove changed the base branch from branch-23.10 to branch-23.12 October 4, 2023 19:38
@andygrove andygrove changed the title WIP: Specify recoverWithNull when reading JSON files Specify recoverWithNull when reading JSON files Oct 23, 2023
@andygrove andygrove marked this pull request as ready for review October 23, 2023 16:36
@andygrove
Copy link
Contributor Author

build

try {
Table.readJSON(cudfSchema, jsonOpts, dataBuffer, 0, dataSize)
} catch {
case e: AssertionError if e.getMessage == "CudfColumns can't be null or empty" =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parsing exception messages is an anti-pattern. Would be nice to have a followup to get a more specific exception type to help distinguish this case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, probably would be better to do this for all Exceptions and AssertionErrors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I filed rapidsai/cudf#14331

@revans2 revans2 merged commit cf109c2 into NVIDIA:branch-23.12 Oct 26, 2023
29 of 30 checks passed
@sameerz sameerz added the task Work required that improves the product but is not user facing label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Work required that improves the product but is not user facing
Projects
None yet
4 participants